package com.isoft.mapper;

import org.apache.ibatis.annotations.*;

import com.isoft.domain.Girl;

import java.util.List;

/**
 * Created by yigeyanse on 2017/6/15.
 */
@Mapper
public interface GirlMapper{

    @Select("select * from girl where id = #{id}")
    Girl findGirlById(@Param("id") Integer id);

    @Select("select * from girl")
    public List<Girl> getAllGirls();

    @Insert("insert into girl(cupSize, age) values(#{cupSize}, #{age})")
    public int add(Girl girl);

    @Delete("delete from girl where id = #{id}")
    public int deleteById(int id);

    @Update("update girl set cupSize = #{cupSize}, age = #{age} where id = #{id}")
    public int updateById(Girl girl);

}
